<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<link rel="stylesheet" type="text/css" href="<?php echo $base_url ;?>css/style2.css" />
        <title><?php echo $company_name; ?> &middot; <?php echo $this->lang->line('page_title'); ?></title>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $base_url; ?>js/jquery.blockUI.js"></script>
<script language="javascript">
		$.noConflict();
		var __base_url   = '<?=base_url()?>';
		var __csrf       = '<?=$this->security->get_csrf_hash();?>';
		var __locale     = '<?php echo str_replace("'","\'",json_encode($locale));?>';
		var __ts		 = <?php echo time(); ?>;
		var __token		 = "<?php echo $token; ?>";
</script>

<style type="text/css">
	.error_descr {
			font-weight:bold;
			color:red;
			display:none;
			padding:0;
			margin:0;
	}
	form tr.error{
		background-color: #FFDFDF !important;
		margin-bottom:3px !important;
	}
	#cookies-warning{display:none;text-align:center;padding:60px 0 30px 0;}
	#cookies-warning h2{margin-bottom:15px !important;}
</style>

	</head>
	<body>
        <div id="notification_message">
        	<div id="notification_close"><a href="/settings/notification_close?msg=">X</a></div>
        	<div id="notification_body"></div>

        </div>
		<noscript>
			<style type="text/css">
				#menu .item {background: #ffffff url(images/mainmenu_active_bg.png) repeat-x top;} 
				#menu .item .level2{display: block;}
			</style>
		</noscript>
		<table width="966" cellpadding="0" cellspacing="0" border="0" align="center">
			<tr>
				<td>
					<div id="header">
						<div class="h_item logo">
							<a href="<?php echo $base_url ;?>">

								<img src="<?php echo $base_url ;?>images/logo.png" alt="" />
							</a>
						</div>

						<div id="topMenu">
	                        
						</div>
					</div>
					<div id="middle">
						<table cellpadding="0" cellspacing="0" border="0" width="100%">

							<tr valign="top">
								
								<td width="200">
									<div id="leftColumn">

										
										<br />
					                    <table border="0" cellpadding="0" cellspacing="0" align="center">
					                    	<tr>
					                    		<td>
	</td>
					                    	</tr>
					                    </table>
									</div>
								</td>
								<td style="width: 15px;">&nbsp;</td>

		                    	
<td id="content">
					   
<h1>Account Login</h1>

<?php if($this->session->flashdata('sessions_login')) echo $this->session->flashdata('sessions_login'); ?>

<div id="cookies-warning">
	<h2>Sorry, GolderMarket's web interface can <br/>only work on a Cookies enabled browser.</h2>
	<p>You'll either need to enable Cookies on your browser or <br /> download a browser that allows you to enable Cookies.</p>
</div>

<form id="login-form" method="post" action="" class="loginForm">
	<table>	
		<tr id="form-item_login-status">
            <td colspan="2">
					<p class="error_descr"></p>
			</td>
        </tr>
	</table>
    <table class="logintable">
        <tr id="form-item_user">
        	<td>Login</td>
            <td width="150">
					<input type="text" class="text" id="user" name="user" maxlength="25" style="width: 98%;" />
					<p class="error_descr"></p>
			</td>
        </tr>
        <tr id="form-item_pass">
        	<td>Password</td>
            <td>
					<input type="password" class="text" id="pass" name="pass" maxlength="25" placeholder="Password" style="width: 98%;" />
					<p class="error_descr"></p>
			</td>
        </tr>
        <tr>
        	<td>&nbsp;</td>
            <td align="center"><input id="bt-login" type="submit" value="Login" style="width: 100%;" /></td>
        </tr>
    </table>
    
    <p><a id="registration" href="#">Registration</a></p>
    <div id="typeAccounts" style="display: none;">
        <div class="leftalign" style="margin-left: 10px;"><a href="<?=base_url()?>users/register_live/">Real account</a></div>
        <div class="leftalign" style="margin-left: 10px;"><a href="<?=base_url()?>users/register_demo/">Demo account</a></div>
        <div class="clear"></div>
    </div>
    <p><a href="/sessions/pass_reset/">Restore my password</a></p>
    <p>After the registration you will get access to additional options in your Personal area. </p> <p>If you forgot the password, you can restore it.</p>    
</form>


								</td>

							</tr>
						</table>
					</div>
					<?php
						$tpl_page 	= new Tpl_page(); $tpl_page->where('type','footer')->get(1);
						if($tpl_page->exists()) echo $tpl_page->content;
					?>
				</td>
			</tr>
		</table>
		
		
<script src="<?php echo $base_url; ?>js/validation.js"></script>
<script src="<?php echo $base_url; ?>js/sessions.js"></script>
<script language="javascript">
		jQuery(document).ready(function() {
				var _obj_local = jQuery.parseJSON(__locale);
				jQuery('#bt-login').click(function(event) {
						event.preventDefault();
						GolderMarkets.Sessions.LiveLogin();
						return false;
				});
				jQuery('#login-form').submit(function() {
						GolderMarkets.Sessions.LiveLogin();
						return false;
				});
				jQuery('#registration').click(function(event) {
						event.preventDefault();
						jQuery('#typeAccounts').toggle('slow');
				});
				// GolderMarkets.Sessions.checkCookiesEnabled();
		});
</script>	
		
	</body>
</html>
